import request from '@/utils/request'
// 获取工单列表
export const list = function(params) {
  return request({
    url: '/api/task-service/task/search',
    method: 'GET',
    params
  })
}

// 获取工单列表
export const taskDetails = function(taskId) {
  return request({
    url: '/api/vm-service/channel/channelList/' + taskId,
    method: 'GET'

  })
}
// 搜索
export const serList = function(params) {
  return request({
    url: '/api/task-service/task/search',
    method: 'GET',
    params
  })
}

// 获取补货预警值
export const warning = function() {
  return request({
    url: '/api/task-service/task/supplyAlertValue',
    method: 'GET'

  })
}
// 设置自动补货工单阈值
export const setReplenishment = function(data) {
  return request({
    url: '/api/task-service/task/autoSupplyConfig',
    method: 'POST',
    data

  })
}
// 角色
export const roleList = function(params) {
  return request({
    url: '/api/user-service/user/search',
    method: 'GET',
    params
  })
}
// 创建工单
export const newList = function(data) {
  return request({
    url: ' /api/task-service/task/create',
    method: 'POST',
    data
  })
}
